package com.example.reclameaquidoseuonibus.activitys;

import com.example.reclameaquidoseuonibus.R;
import com.example.reclameaquidoseuonibus.R.color;
import com.jjoe64.graphview.GraphView;
import com.jjoe64.graphview.GraphView.GraphViewData;
import com.jjoe64.graphview.GraphViewSeries;
import com.jjoe64.graphview.LineGraphView;

import android.app.ActionBar;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Spinner;

public class GraficosActivity extends Activity {

	private int[] imagens = { R.drawable.grafico1, R.drawable.grafico2 };
	private String[] graficos = new String[] { "Por Empresa", "Por Categoria" };
	private ProgressDialog dialog;
	private Handler handler;
	private static int TEMPO_EXECUCAO = 3000;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.graficos_activity);
		

		final ImageView imagem = (ImageView) findViewById(R.id.img);
		final Spinner comboGraficos = (Spinner) findViewById(R.id.comboGrafico);

		ArrayAdapter<String> adaptadorGrafico = new ArrayAdapter<String>(this,
				android.R.layout.simple_spinner_item, graficos);
		adaptadorGrafico
				.setDropDownViewResource(android.R.layout.simple_spinner_item);

		comboGraficos.setAdapter(adaptadorGrafico);

		ActionBar actionBar = getActionBar();
		actionBar.setDisplayHomeAsUpEnabled(true);
		
		
		/*
		 * comboGraficos.setOnItemSelectedListener(new
		 * AdapterView.OnItemSelectedListener() { public void
		 * onItemSelected(AdapterView<?> parent, View v, int posicao, long id) {
		 * 
		 * imagem.setImageResource(imagens[posicao]); } public void
		 * onNothingSelected(AdapterView<?> parent) { } });
		 */

	}

	public void verGrafico(View view) {
		
		Intent intent = new Intent (this, Grafico.class);
		startActivity(intent);
		
		
		
	}
		
		

}
